home *** CD-ROM | disk | FTP | other *** search
-
- COMPARE
- Command
-
- Michael J. Mefford 1988 No. 11
- (Utilities)
-
-
- Purpose: Displays the differences between two text or two
- binary files. Files need not be the same length, and paragraph reformatting changes introduced by word wrap are ignored.
-
- Format: COMPARE filespec filespec[/B][/W]
-
- Remarks: COMPARE's default assumption is that the filenames designated in
- filespec are to be compared as ASCII text files. Formatting commands
- embedded by word processing programs are reproduced on screen but are not
- acted upon. Files in which the "high bit" is set (such as those produced by
- WordStar's document mode) can be made displayable in ASCII by entering the
- optional /W on the command line.
-
- Files are displayed in two on-screen windows. Differences are shown
- in inverse video, and are preceeded by several lines of matching text to
- provide a context. When the windows are filled, pressing any key continues to
- search for differences; pressing Esc returns the user to DOS. All character
- modes, but no graphics modes, are supported.
-
- Files with .COM or .EXE extensions are automatically displayed in
- COMPARE's binary mode, which is similar to that produced by DEBUG.COM. Unlike
- DEBUG, however, COMPARE uses the IBM/ASCII symbol set rather than periods to
- show non-alphanumeric characters, and its segment offset begins at zero rather
- than at 100h. Any file can be compared in binary mode by adding the optional
- /B switch on the command line.
-
- Note: When COMPARE finds a difference between files it searches ahead up to
- 400 bytes (the reach value) for a string of 10 (excluding spaces) successive
- matching characters (the sequence value). DEBUG.COM can be used to change the
- reach and search values on a copy of COMPARE.COM thus:
-
- DEBUG COMPARE.COM
- E 6ED cd ab
- E 6F5 cd ab
- E 6F9 gh ef
- W
- Q
-
- where abcd is the reach value, in hex (default 0190h) and efgh is the
- sequence value (default 000Ah).